/**********************************************************************************
// StarField Header File
// 
// Creation:	06 Out 2009
// Updated:		30 May 2011
// Compiler:	Visual Studio 2010
//
// Notes:		Create moving stars (pixels) on the screen
//
**********************************************************************************/

#ifndef _STARFIELD_H_
#define _STARFIELD_H_

#include "Color.h"

// Number of stars in the starfield
#define NUM_STARS 256

/**********************************************************************************/

class Star
{
private:
	int x, y;		// star position
	int vel;		// star horizontal velocity
	Color color;	// star color
public:
	Star();
	Star(int maxPosX, int maxPosY);
	~Star();

	int      GetPosX() const   { return x; }
	void     SetPosX(int posX) { x = posX; }
 	int      GetPosY() const   { return y; }
	int      GetVel() const    { return vel; }
	Color    GetColor() const  { return color; }
};

/**********************************************************************************/

class StarField
{
private:
	int spaceX;
	int spaceY;
	int numStars;
	Star * field;
public:
	StarField();
	StarField(int maxX, int maxY, int numberOfStars);
	StarField& operator=(const StarField& sf);
	~StarField();
	void DrawStars();
	void MoveStars();
};

/**********************************************************************************/

#endif








